import 'dart:convert';

import 'package:flutterproject/generated/json/base/json_field.dart';
import 'package:flutterproject/generated/json/my_assets_bean.g.dart';

@JsonSerializable()
class MyAssetsBean {
  List<MyAssetsList>? list;
  double? totalAmount;

  MyAssetsBean();

  factory MyAssetsBean.fromJson(Map<String, dynamic> json) =>
      $MyAssetsBeanFromJson(json);

  Map<String, dynamic> toJson() => $MyAssetsBeanToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class MyAssetsList {
  double? amount;
  double? balance;
  double? frozen;
  int? id;
  int? type;

  MyAssetsList();

  factory MyAssetsList.fromJson(Map<String, dynamic> json) =>
      $MyAssetsListFromJson(json);

  Map<String, dynamic> toJson() => $MyAssetsListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
